package richrail.tools;

import java.awt.Image;
import java.awt.Toolkit;

public class ImageLoader {
	private static final long serialVersionUID = 1L;
	
	private static ImageLoader instance;
	
	private static final String dir = "../resources/images/";
	
	private ImageLoader(){};
	
	public static Image getImage(String filename) {
		return Toolkit.getDefaultToolkit().getImage(dir + filename);
	}
	
	public static ImageLoader getInstance() {
		if(instance == null) {
			instance = new ImageLoader();
		}
		return instance;
	}

}

